<?php
include("include/connect.inc.php");
include("include/function.inc.php");
include("include/queries.inc.php");
switch(@$_GET['t'])
{
	case 'endit':
		echo json_encode(
			array(
				"erreur"=> 0,
				"inserted"=> endTask($connmysql,$_GET['task_id'],$_GET['user_id']),
				"task_id"=>$_GET['task_id'],
				"user_id"=>$_GET['user_id']));
	break;
	case 'startit':
		echo json_encode(
			array(
				"erreur"=> 0,
				"inserted"=> startTask($connmysql,$_GET['task_id'],$_GET['user_id']),
				"task_id"=>$_GET['task_id'],
				"user_id"=>$_GET['user_id']));
	break;
}
?>
